{weiget frontend_weiget/header}

	 <section>
         <!-- Page content-->
         <div class="content-wrapper">
            <h3>处理<a href="{SELF_URL}operation/list/?id={$prototypeid}"><!--{$prototypeInfo[title]}--></a>
               <small><!--{$prototypeInfo[desc]}--></small>
            </h3>
            <!-- START panel-->
            <div class="panel panel-default">
               <div class="panel-body">
                  <form method="post" id="workflowform" action="{SELF_URL}operation/update/?id={$prototypeid}&cacheid={$cacheid}" class="form-horizontal">
					 <!--{loop $fields $field}-->
					 <!--{if $field[ishidden] < 1}-->
					 <!--{if $field[isshow] < 1}-->
						 <!--{if $field[bindingid]}-->
						 <fieldset>
							<div class="form-group">
							   <label class="col-sm-2 control-label"><!--{$field[title]}--></label>
							   <div class="col-sm-6">
								  <select name="operation[{$field[name]}]" class="chosen-select form-control">
									 <option value="0">无</option>
								  <!--{loop $bindingArray[$field[name]] $binding}-->
								  <!--{if $binding[id] == $operationInfo[$field[name]]}-->
									 <option value="{$binding[id]}" selected="selected"><!--{$binding[title]}--></option>
								  <!--{else}-->
									 <option value="{$binding[id]}"><!--{$binding[title]}--></option>
								  <!--{/if}-->
								  <!--{/loop}-->
								  </select>
							   </div>
							   <div class="col-sm-4"></div>
							</div>
						 </fieldset>
						 <!--{else}-->
						 <fieldset>
							<div class="form-group">
							   <label class="col-sm-2 control-label"><!--{$field[title]}--></label>
							   <div class="col-sm-6">
								  <input type="text" placeholder="{$field[note]}" name="operation[{$field[name]}]" class="form-control" data-parsley-minlength="4" value="{$operationInfo[$field[name]]}">
							   </div>
							   <div class="col-sm-4"></div>
							</div>
						 </fieldset>
						 <!--{/if}--> 
					 <!--{else}-->
						 <!--{if $field[bindingid]}-->
						 <fieldset>
							<div class="form-group">
							   <label class="col-sm-2 control-label"><!--{$field[title]}--></label>
							   <div class="col-sm-6">
									<p class="form-control-static">
								  <!--{loop $bindingArray[$field[name]] $binding}-->
								  <!--{if $binding[id] == $operationInfo[$field[name]]}-->
									 <!--{$binding[title]}-->
								  <!--{/if}-->
								  <!--{/loop}-->
									</p>
								  </select>
							   </div>
							   <div class="col-sm-4"></div>
							</div>
						 </fieldset>
						 <!--{else}-->
						 <fieldset>
							<div class="form-group">
							   <label class="col-sm-2 control-label"><!--{$field[title]}--></label>
							   <div class="col-sm-6">
									<p class="form-control-static">
										<!--{$operationInfo[$field[name]]}-->
									</p>
							   </div>
							   <div class="col-sm-4"></div>
							</div>
						 </fieldset>
						 <!--{/if}--> 
					 <!--{/if}-->
					 <!--{/if}-->
					 <!--{/loop}-->

                     <fieldset>
                        <div class="form-group">
                           <div class="col-sm-4 col-sm-offset-2">
						   <input type="hidden" name="dosubmit" value="1">
						   <input type="hidden" name="operation[workflowid]" id="thisworkflowid" value="{$operationInfo[workflowid]}">
						   <input type="hidden" id="goafter" value="{$workflowInfo[after]}">
						   <input type="hidden" id="gobefore" value="{$workflowInfo[before]}">
							  <!--{if $workflowInfo[after]}-->
                              <button type="button" id="buttongoafter" class="btn btn-primary">确认</button>
							  <!--{/if}-->
							  <!--{if $workflowInfo[before]}-->
                              <button type="button" id="buttongobefore" class="btn btn-primary">拒绝</button>
							  <!--{/if}-->
                           </div>
                        </div>
                     </fieldset>

                  </form>
               </div>
            </div>
            <!-- END panel-->

					 <script type="text/javascript">
						$(document).ready(function(){
							//执行确认
							$('#buttongoafter').click(function(){
								var wfid = $('#goafter').val();
								$("#thisworkflowid").val(wfid);
								$("#workflowform").submit();
							});
							//执行拒绝
							$('#buttongobefore').click(function(){
								var wfid = $('#gobefore').val();
								if(wfid > 0){
									$("#thisworkflowid").val(wfid);
									$("#workflowform").submit();
								}
							});
						});
					 </script>
         </div>
      </section>

{weiget frontend_weiget/footer}
